export function useShortcuts() {
  return [
    {
      text: '前一周',
      value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
        return [start, end]
      },
    },
    {
      text: '前一月',
      value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
        return [start, end]
      },
    },
    {
      text: '前三月',
      value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
        return [start, end]
      },
    },
    {
      text: '前一年',
      value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30 * 12)
        return [start, end]
      },
    },
    {
      text: '前三年',
      value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30 * 12 * 3)
        return [start, end]
      },
    },

    {
      text: '后一周',
      value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() + 3600 * 1000 * 24 * 7)
        return [start, end].reverse()
      },
    },
    {
      text: '后一月',
      value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() + 3600 * 1000 * 24 * 30)
        return [start, end].reverse()
      },
    },
    {
      text: '后三月',
      value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() + 3600 * 1000 * 24 * 90)
        return [start, end].reverse()
      },
    },
    {
      text: '后一年',
      value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 12)
        return [start, end].reverse()
      },
    },
    {
      text: '后三年',
      value: () => {
        const end = new Date()
        const start = new Date()
        start.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 12 * 3)
        return [start, end].reverse()
      },
    },
  ]
}
